function GamePanel(x, width, td)
{
  var _x;
  var _width;
  var _root;
  var _td;
  var message;
  var towersPanel;
  var infoPanel;
  var pointsPanel;
  var lifesPanel;
  var levelPanel;
  
  this._x = x;
  this._width = width;
  this._td = td;
}

GamePanel.prototype.Init = function()
{
  //dibujo el panel
  this._root = new MovieClip();
  
  this._root.DrawRectangle(0, 0, this._width, 600, '#CCCCFF', 1);
  this._root.x = this._x;
  this._root.y = 0;
  
  //creo el panel de vidas
  this.lifesPanel = new LifesPanel(this._x + 15, 5, 
	this._width - 30, 40, 3, 3, this._td);
  this.lifesPanel.Init();
  
  //creo el panel de puntaje
  this.pointsPanel = new PointsPanel(this._x + 15, 50, 
	this._width - 30, 40, 3, 3, this._td);
  this.pointsPanel.Init();
  
  //creo el panel de torres
  this.towersPanel = new TowersPanel(this._x + 15, 95, 
	this._width - 30, 120, 3, 3, this._td.towerTypes, this._td);
  this.towersPanel.Init();
  
  //creo el info panel
  this.infoPanel = new InfoPanel(this._x + 15, 300, 
	this._width - 30, 80, 3, 3, this._td);
  this.infoPanel.Init();
  
  //creo el levels panel
  this.levelPanel = new LevelPanel(this._x + 15, 464, 
	this._width - 30, 80, this._td);
  this.levelPanel.Init();
}

GamePanel.prototype.ShowTowerPropertyes = function(tower)
{
	this.infoPanel.ShowTowerPropertyes(tower);
}

GamePanel.prototype.ShowEnemyPropertyes = function(enemy)
{
	this.infoPanel.ShowEnemyPropertyes(enemy);
}

GamePanel.prototype.SetLifes = function(lifes)
{
	this.lifesPanel.UpdateLifes(lifes);
}

GamePanel.prototype.SetPoints = function(points)
{
	this.pointsPanel.UpdatePoints(points);
}

GamePanel.prototype.Work = function()
{
	this.levelPanel.Work();
}

GamePanel.prototype.toString = function()
{
  return "[GamePanel]";
}